package com.cc.demo.channel;

import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

public interface TransactionChannel {

    String TRANSACTION_CONFIRMED = TransactionChannelConstant.TRANSACTION_CONFIRMED;

    String TRANSACTION_COMPLETED = TransactionChannelConstant.TRANSACTION_COMPLETED;

    String TRANSACTION_FAILED = TransactionChannelConstant.TRANSACTION_FAILED;

    String CONSUMER_OUTPUT = TransactionChannelConstant.CONSUMER_OUTPUT;
    ;

    @Input(TRANSACTION_CONFIRMED)
    SubscribableChannel confirm();

    @Input(TRANSACTION_COMPLETED)
    SubscribableChannel completed();

    @Input(TRANSACTION_FAILED)
    SubscribableChannel error();

    @Output(CONSUMER_OUTPUT)
    MessageChannel output();
}
